{template 'common/header'}
<div class="main">
	<form method="post" class="form-horizontal">
	<div style="padding:15px;">
		<table class="table table-hover">
			<thead class="navbar-inner">
				<tr>
					<th style="width:30px;">删？</th>
					<th style="width:150px;">店员名称</th>
					<th style="width:100px;">密码</th>
				</tr>
			</thead>
			<tbody id="list">
				{loop $list $item}
				<tr>
					<td><input type="checkbox" name="delete[]" value="{$item['id']}" /></td>
					<td><input type="text" name="title[{$item['id']}]" class="span6" value="{$item['name']}" /></td>
					<td><input type="text" name="password[{$item['id']}]" class="span6" value="" placeholder="密码已保密，重新输入可重置密码" /></td>
				</tr>
				{/loop}
			</tbody>
			<tbody style="border-top:0;">
			<tr>
				<td></td>
				<td colspan="2">
					<a href="javascript:;" onclick="addItem()"><i class="icon-plus-sign-alt"></i> 添加</a>
				</td>
			</tr>
			<tr>
				<td></td>
				<td colspan="2">
					<input name="token" type="hidden" value="{$_W['token']}" />
					<input type="submit" class="btn btn-primary" name="submit" value="提交" />
				</td>
			</tr>
			</tbody>
		</table>
	</div>
	</form>
</div>
<script type="text/javascript">
<!--
	function addItem() {
		var html = '' +
				'<tr>' +
					'<td></td>' +
					'<td><input type="text" name="title-new[]" class="span6" value="" /></td>' +
					'<td><input type="text" name="password-new[]" class="span6" value="" /></td>' +
				'</tr>';
		$('#list').append(html);
	}
	function deleteItem(o) {
		$(o).parent().parent().remove();
	}
//-->
</script>
{template 'common/footer'}